package mya.mes.mdc.model.excel;


import com.alibaba.fastjson.JSONObject;
import mya.mes.mdc.model.tag.convert.ExcelTagAlarmDefConverter;

import java.util.Map;

/**
 * 对应Excel中的一行
 */
//@DataObject(generateConverter = true)
public class ExcelTagAlarmDef {

  /**
   * Excel中的行号
   */
  public int rowNum;

  //PLC 地址	No	index	BIT	RDB TAG	ref	en-US	zh-CN
  public String plcAddress;

  public String no;

  public Integer index;

  public Integer bit;

  public String rdbTag;

  public String ref;

  public String enUs;

  public String zhCN;

  public Boolean needSendToManager;//是否给管理者发送

  public Boolean needSendToPerson;//是否给普通工人发送

  /**
   * 发送公众号消息
   */
  public Boolean msgNotice;


  public ExcelTagAlarmDef() {
  }

  public ExcelTagAlarmDef(Map json) {
    ExcelTagAlarmDefConverter.fromJson(json, this);
  }

  public JSONObject toJson() {
    JSONObject json = new JSONObject();
    ExcelTagAlarmDefConverter.toJson(this, json);
    return json;
  }

  public int getRowNum() {
    return rowNum;
  }

  public void setRowNum(int rowNum) {
    this.rowNum = rowNum;
  }

  public String getPlcAddress() {
    return plcAddress;
  }

  public void setPlcAddress(String plcAddress) {
    this.plcAddress = plcAddress;
  }

  public String getNo() {
    return no;
  }

  public void setNo(String no) {
    this.no = no;
  }

  public Integer getIndex() {
    return index;
  }

  public void setIndex(Integer index) {
    this.index = index;
  }

  public Integer getBit() {
    return bit;
  }

  public void setBit(Integer bit) {
    this.bit = bit;
  }

  public String getRdbTag() {
    return rdbTag;
  }

  public void setRdbTag(String rdbTag) {
    this.rdbTag = rdbTag;
  }

  public String getRef() {
    return ref;
  }

  public void setRef(String ref) {
    this.ref = ref;
  }

  public String getEnUs() {
    return enUs;
  }

  public void setEnUs(String enUs) {
    this.enUs = enUs;
  }

  public String getZhCN() {
    return zhCN;
  }

  public void setZhCN(String zhCN) {
    this.zhCN = zhCN;
  }

  public Boolean getMsgNotice() {
    return msgNotice;
  }

  public void setMsgNotice(Boolean msgNotice) {
    this.msgNotice = msgNotice;
  }

  public Boolean getNeedSendToManager() {
    return needSendToManager;
  }

  public void setNeedSendToManager(Boolean needSendToManager) {
    this.needSendToManager = needSendToManager;
  }

  public Boolean getNeedSendToPerson() {
    return needSendToPerson;
  }

  public void setNeedSendToPerson(Boolean needSendToPerson) {
    this.needSendToPerson = needSendToPerson;
  }
}
